<template>
  <div class="dv" >
    <van-card
      v-for="(item, index) in list"
      :key="index"
      :desc="item.characteristic"
      :title="item.name"
      :thumb="item.pic"
      v-show="index<10"
      @click="goshopcar(item)"
    >
      <template #tags>
        <div>
          <div class="dv1">
            <span class="sp1">{{ item.minPrice }}</span>
            <span>{{ item.originalPrice }}</span>
            <span>{{ item.stores }}件</span>
          </div>
          <br />
          <div class="dv1">
            <span>低价</span>
            <span>原价</span>
            <span>限量</span>
          </div>
        </div>
      </template></van-card
    >
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      page: 1,
      pageSize: 3,
    };
  },
  mounted() {
    this.$API.getStoreList().then((res) => {
      this.list = res.data.data;
      this.list=this.list.slice(5,)
    });
   
  },
  methods:{
    goshopcar(item) {
      this.$router.push({ path: "/shopcar", query: { id:item.id } });
    },
  }
};
</script>

<style lang="scss" scoped>
.centerkan {
  height: 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  span {
    font-size: 1rem;
  }
}
.dv1 {
  display: flex;
  justify-content: space-around;
  // flex-wrap: wrap;
}
.sp1 {
  color: red;
  font-weight: 700;
}
.dv{
    margin-top: 20%;
}
</style>